package com.vigmonk.utils {

	/**
	 * ColorUtil.as
	 * @author VIGMONK
	 */
	public class ColorUtil {
	}
	
	
	public static function rgbToHex(r:Number, g:Number, b:Number):Number
	{ 
		return (r<<16 | g<<8 | b); 
	} 

	public static function hexToRgb(hex:Number):Object
	{
		var tr:Number = (hex >> 16);
		var tg:Number = (hex >> 8 ^ tr << 8);
		var tb:Number = (hex ^ (tr << 16 | tg << 8));
		return {r:tr, g:tg, b:tb};
	}
}
